unit UnitDGQYJFQKCX;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Unit1, DB, ADODB, Grids, DBGridEh, StdCtrls, Spin;

type
  TformDGQYJFQKCX = class(Tbaseform)
    ADOQuery1: TADOQuery;
    DBGridEh1: TDBGridEh;
    DataSource1: TDataSource;
    SpinEdit1: TSpinEdit;
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Button1: TButton;
    ADOQuery2: TADOQuery;
    procedure FormShow(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  formDGQYJFQKCX: TformDGQYJFQKCX;

implementation

{$R *.dfm}
uses
  Unitconne, DateUtils;

procedure TformDGQYJFQKCX.FormShow(Sender: TObject);
begin
  inherited;
  SpinEdit1.Text:=IntToStr(yearof(Now));
end;

procedure TformDGQYJFQKCX.Button1Click(Sender: TObject);
begin
  inherited;
  with ADOQuery1 do
  begin
    Close;
    Parameters.ParamByName('qymc').Value:='%' + Trim(Edit1.Text) + '%';
    Parameters.ParamByName('sbdm').Value:='%' + Trim(Edit1.Text) + '%';
    Parameters.ParamByName('nd').Value:=SpinEdit1.Text;
    Open;
  end;

end;

end.
